<?php
class Dig_View_Helper_DigProfiler extends Zend_View_Helper_Abstract
{
    public function digProfiler() {
        $adapter = Zend_Db_Table::getDefaultAdapter();
        $profiler = $adapter->getProfiler();
        if($profiler->getEnabled() == true) {
            Zend_Debug::dump($profiler->getTotalNumQueries(), 'queries');
            Zend_Debug::dump($profiler->getTotalElapsedSecs(), 'elapsed seconds');
            Zend_Debug::dump($profiler->getQueryProfiles(), 'profiles');
        }
    }
}
?>
